Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-722

zkServer.sh uses sh's builtin echo on BSD, behaves incorrectly.

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3.0
    • 3.3.1, 3.4.0
    • scripts
    • None
    • Mac OS X

    • Reviewed
    • Fix zkServer.sh script for BSD systems.

    Description

      zkServer.sh output the PID of the zookeeper process with:
      echo -n $! > "$ZOOPIDFILE"

      This uses -n which sh's builtin echo does not support. From echo's manpage.
      <snip>
      Some shells may provide a builtin echo command which is similar or identical to this utility. Most notably, the builtin echo in sh(1) does not accept
      the -n option. Consult the builtin(1) manual page.
      </snip>

      This means that echo -n PID > ZOOPIDFILE will mean the contents of ZOOPIDFILE will be "-n PID". This stops zkServer.sh stop from working correctly.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ikelly Ivan Kelly Assign to me
            ikelly Ivan Kelly
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment